<template>
    <div>
        <component :is="one"></component>

        <div id="container">
            <div id="content2">
                <table width="100%" height="41" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="15" height="18" align="left" valign="top">
                            <div align="left"></div>
                        </td>
                        <td width="385" align="left" valign="bottom" class="12">&nbsp;</td>
                    </tr>
                    <tr>
                        <td height="4" colspan="2" align="left" valign="bottom"></td>
                    </tr>
                    <tr>
                        <td height="15" align="left" valign="top">&nbsp;</td>
                        <td height="15" align="left" valign="top" class="12">
                            <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td height="20" align="center">
                                        <div class="right_proaducts">
                                            <div align="left">我的位置&gt;&gt;科技项目申报&gt;项目查询</div>
                                        </div>
                                        <!-- <form action="/highquery1.html" method="post" id="form"> -->
                                            <!-- <DIV class=padding>
                                                <DIV id=middlebody> -->
                                                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                        <tbody>
                                                            <tr>
                                                                <td>
                                                                    <div align="left">
                                                                        |&nbsp;&nbsp;欢迎,单位用户&nbsp;&nbsp;|&nbsp;&nbsp;
                                                                        <a class="table_t"
                                                                            href="#/">注销      </a>&nbsp;&nbsp;|&nbsp;&nbsp;
                                                                        <a
                                                                            href="javascript:history.go(-1)">后退</a>&nbsp;&nbsp;|
                                                                    </div>
                                                                </td>
                                                                <td>
                                                                    <div align="center"><a
                                                                            href="#/unit/unitinfo">单位信息</a></div>
                                                                </td>
                                                                <td>
                                                                    <div align="center"><a
                                                                            href="#/unit/reworkpassword">修改密码</a>
                                                                    </div>
                                                                </td>
                                                                <td>
                                                                    <div align="center"><a
                                                                            href="#/unit/showprojectcategory">项目申报管理</a>
                                                                    </div>
                                                                </td>
                                                                <td height="50">
                                                                    <div align="center"><a
                                                                            href="#/unit/simplesearch">信息查询</a>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                    <div id="app">
                                                        <div align="center">
                                                            <table width="60%" border="0" cellpadding="0"
                                                                cellspacing="1" bgcolor="#f3f3f3">
                                                                <tbody>
                                                                    <tr>
                                                                        <td align="center" width="20%" valign="middle">
                                                                            项目内容:</td>
                                                                        <td align="left" width="80%"><input type="text"
                                                                                name="sercontext" size="30"
                                                                                v-model="searchData.projectName"></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center">开始日期</td>
                                                                        <td align="left"><input type="text"
                                                                                name="startDate"
                                                                                v-model="searchData.rep_start_time" />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center">结束日期</td>
                                                                        <td align="left"><input type="text"
                                                                                name="endDate"
                                                                                v-model="searchData.rep_stop_time" />
                                                                        </td>
                                                                    <tr>
                                                                        <td align="center">申请资金</td>
                                                                        <td align="left"><input type="text" name="money"
                                                                                size="30" v-model="searchData.capital">
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="2" align="center"><input
                                                                                type="button" value="高级查询"
                                                                                style="font-size:8pt"
                                                                                @click="highQuery()"></td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </div>
                                                        <table width="100%" border="0" cellpadding="0" cellspacing="1">
                                                            <tbody>
                                                                <tr>
                                                                    <td align="center" bgcolor="#fba661">主项目</td>
                                                                    <td align="center" bgcolor="#fba661">分项目</td>
                                                                    <td width="208" align="center" bgcolor="#fba661">操作
                                                                    </td>
                                                                </tr>
                                                                <tr v-for="(list,i) in dataList">
                                                                    <td width="150" align="center" bgcolor="#f3f3f3">
                                                                        {{list.categoryName}}</td>
                                                                    <td width="342" align="center" bgcolor="#f3f3f3"><a
                                                                            href="#/unit/projectinfo1"
                                                                            @click="sendPid(i)">{{list.projectName}}</a>
                                                                    </td>
                                                                    <td align="center" bgcolor="#f3f3f3"
                                                                        v-if="list.expert_opinion==null"><a
                                                                            href="#/unit/projectinfo"
                                                                            @click="sendPid(i)">没有评审</a></td>
                                                                    <td align="center" bgcolor="#f3f3f3" v-else="">
                                                                        专家已评审，不可修改</td>
                                                                </tr>

                                                            </tbody>
                                                        </table>
                                                    </div>
                                                    <div></div>
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <div class="table_wz"></div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <component :is="two"></component>
    </div>
</template>
<script>
    import four from '../../util/four';
    import aaa from '@/components/header.vue'
    import bbb from '@/components/footer.vue'
    export default {
        components: {
            aaa, bbb
        },
        data() {
            return {
                one: 'aaa',
                two: 'bbb',
                searchData: {
                    "projectName": "",
                    "rep_start_time": "",
                    "rep_stop_time": "",
                    "capital": ""
                },
                dataList: [],
            }
        },
        mounted() {
            this.getData();
        },
        methods: {
            //接收简单查询数据
            getData() {
                let hData = JSON.parse(sessionStorage.getItem("hData"));
                this.dataList = hData;
            },

            highQuery() {
                four.post("/projectManage/highsearch", this.searchData).then((res) => {
                    sessionStorage.setItem("hData", JSON.stringify(res.data.data));
                    //刷新页面
                    location.reload();
                });
            },
            sendPid(i) {
                let pid = this.dataList[i].project_id;
                sessionStorage.setItem("pid", pid);
            },

        }
    }
</script>